package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.UserDataAuth;
import com.vrv.vap.baseline.mapper.UserDataAuthMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class UserDataAuthExportService extends AbstractExcelExportService<UserDataAuth> {
    @Autowired
    private UserDataAuthMapper userDataAuthMapper;

    public UserDataAuthExportService(FileOperationUtil fileOperationUtil, ExcelTemplateConfig excelTemplateConfig) {
        super(fileOperationUtil, excelTemplateConfig, "user_data_auth");
    }

    @Override
    protected List<UserDataAuth> getAllData() {
        return userDataAuthMapper.selectAll();
    }

    @Override
    protected void processData(List<UserDataAuth> dataList, String format) throws IOException {
        // 如果需要对数据进行处理，可以在这里实现
    }

    @Override
    protected Class<UserDataAuth> getEntityClass() {
        return UserDataAuth.class;
    }
}